package com.example.design.simplefactory;

public class ChartFactory {
	
	public static Chart getChart(String type) {
		Chart chart = null;
		if(type.equalsIgnoreCase("histogram"))
			chart = new HistogramChart();
		else if(type.equalsIgnoreCase("line"))
			chart = new LineChart();
		else if(type.equalsIgnoreCase("pie"))
			chart = new PieChart();
		return chart;
	}
}
